<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>分页显示</title>
</head>

<body>
	<%
dim conn,rsOdr,sqlOdr
set conn=server.createobject("adodb.connection")
set rsOdr=server.createobject("adodb.recordset")
conn.open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("Databases/0479netdate.mdb"))


'查询用户所有的预约记录
sqlOdr = "SELECT * FROM UserOrder WHERE UserID = 33 Order BY OrderDate DESC"
rsOdr.open sqlOdr,conn,1

rsOdr.PageSize=6'设置页码 
if request("page")<>"" then
  epage=cint(request("page"))
   if epage<1 then epage=1
   if epage>rsOdr.pagecount then epage=rsOdr.pagecount
else
	epage=1
end if
rsOdr.absolutepage=epage
%>
<table width='100%' class="data_table" cellpadding='0' cellspacing='0'>
<tr>
<td height="20" colspan="6" align="center" class="td_center"><font color="#FF6600" class=font14><b>在线学车预约信息</b></font></td>
</tr>
<tr>
	<th>预约编号</th>
	<th>预约日期</th>
	<th>预约备注</th>
</tr>
<%
for i=0 to rsOdr.pagesize-1
if rsOdr.bof or rsOdr.eof then exit for
%>
<tr>
		<td><%=rsOdr(0).value%></td>
		<td><%=rsOdr(1).value%></td>
		<td><%=rsOdr(2).value%></td>
	</tr>
<%
rsOdr.movenext
next
%>
<tr>
	<td colspan="6">
		<p align="center">
		<a href="?page=1">首页</a>&nbsp;
		<a href="?page=<%=epage-1%>">前一页</a>&nbsp;
		<a href="?page=<%=epage+1%>">后一页</a>&nbsp;
		<a href="?page=<%=rsOdr.pagecount%>">末页</a>
		</p>
		<p align="center">现在是第<%=epage%>页一共有<%=rsOdr.pagecount%>页</p>
	</td>
</tr>
</table>
<%
conn.close()
%>
	
</body>
</html>
